
int man_order(void)
{
	FILE* file_sup; 
	struct n_suppliers* suppliers;
	suppliers = NULL;
	int option;
	char r;
	int firstrun, out;
	firstrun = FALSE;
	out = FALSE;

	if ((file_sup = fopen(F_SUP, "r+b")) == NULL){
		firstrun = TRUE;
		printf ("FIRST RUN...\n");
	} else 	if (firstrun == FALSE){
		printf ("NOT FIRST RUN.\n");
		init_file_sup (file_sup, &suppliers);
	}
	do {
		printf ("(1) para añadir proveedor\n");
		printf ("(2) para editar datos de proveedor\n");
		printf ("(3) para borrar proveedor\n");
		printf ("(4) para enseñar proveedor\n");
		printf ("(0) para volver al menu principal\n");
		scanf ("%d", &option);
		scanf ("%c", &r);
		switch (option){
			case 1:
				add_supplier(&suppliers);
				break;
			case 2:
				edit_supplier(&suppliers);
				break;
			case 3:
				del_supplier(&suppliers);
				break;
			case 4:
				show_supplier(suppliers);
				break;
			case 0:
				record_data(&suppliers);
				out = TRUE;
				return 0;
				break;
			default:
				printf ("Opcion no encontrada\n");
				break;
		}
	} while ( out == FALSE);
	return 0;
}
